import request from '@/utils/request'

// 获取部门列表
export const getDepartmentListApi = () => {
  return request.get('/company/department')
}

// 获取部门负责人数据  getManagerList
export const getManagerApi = () => {
  return request.get('/sys/user/simple')
}

// 添加子级菜单
export const addDepartmentApi = data => {
  return request.post('/company/department', data)
}

// * 获取部门详情
export const getDepartmentInfoApi = id => {
  return request.get('/company/department/' + id)
}

// * 修改部门
export const editDepartmentApi = data => {
  return request.put('/company/department' + data.id, {
    data
  })
}

// * 删除部门详情
export const delDepartmentInfoApi = id => {
  return request.delete('/company/department/' + id)
}
